alert('SceneMenu.js loaded');


function SceneMenu() {

};

SceneMenu.prototype.initialize = function () {
	alert("SceneMenu.initialize()");
	// this function will be called only once when the scene manager show this scene first time
	// initialize the scene controls and styles, and initialize your variables here
	// scene HTML and CSS will be loaded before this function is called

	$('#play').sfLabel({
		text: "play"
	});
	
	$('#roue').sfImage({
		src:'images/roue.png'
	});
	
	$('#infos').sfLabel({
		text: "Informations"
	});
	
	$('#extra').sfLabel({
		text: "Extras"
	});
	
	$('#options').sfLabel({
		text: "Options"
	});
	
	$('#exp').sfLabel({
		text: "Get Expansion"
	});
	

	alert("------------------------------------------------------------");
	$('#roue').css('top','152px');
	$('#roue').css('left','400px');
	$('#infos').css('top','340px');
	$('#infos').css('left','200px');
	$('#exp').css('top','100px');
	$('#exp').css('left','500px');
	$('#extra').css('top','340px');
	$('#extra').css('left','800px');
	$('#options').css('top','600px');
	$('#options').css('left','500px');
	$('#play').css('top','400px');
	$('#play').css('left','510px');
	alert($('#roue').css('top'));
	alert($('#roue').css('left'));
	alert($('#roue').css('z-index'));
	alert($('#play').css('z-index'));
	alert("------------------------------------------------------------");
	
	sf.scene.show('ToolBar');
	
};

SceneMenu.prototype.handleShow = function (data) {
	alert("SceneMenu.handleShow()");
	// this function will be called when the scene manager show this scene
};

SceneMenu.prototype.handleHide = function () {
	alert("SceneMenu.handleHide()");
	// this function will be called when the scene manager hide this scene
};

SceneMenu.prototype.handleFocus = function () {
	alert("SceneMenu.handleFocus()");
	// this function will be called when the scene manager focus this scene
};

SceneMenu.prototype.handleBlur = function () {
	alert("SceneMenu.handleBlur()");
	// this function will be called when the scene manager move focus to another scene from this scene
};

SceneMenu.prototype.handleKeyDown = function (keyCode) {
	alert("SceneMenu.handleKeyDown(" + keyCode + ")");
	// TODO : write an key event handler when this scene get focued
	switch (keyCode) {
		/*case 101:
			changeLabelTxt('labelRed','kikoo');
			break;*/
		case sf.key.LEFT:
			sf.scene.hide('Menu');
			sf.scene.show('Infos');
			sf.scene.focus('Infos');
			break;
		case sf.key.RIGHT:
			sf.scene.hide('Menu');
			sf.scene.show('Extra');
			sf.scene.focus('Extra');
			break;
		case sf.key.UP:
			sf.scene.hide('Menu');
			sf.scene.show('Expansion');
			sf.scene.focus('Expansion');
			break;
		case sf.key.DOWN:
			sf.scene.hide('Menu');
			sf.scene.show('Options');
			sf.scene.focus('Options');
			break;
		case sf.key.ENTER:
			sf.scene.hide('Menu');
			sf.scene.show('Profile');
			sf.scene.focus('Profile');
			break;
		default:
			alert("handle default key event, key code(" + keyCode + ")");
			break;
	}
};
